package com.wish.finance.controller;


import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wish.common.core.usconfig.common.MsgResult;
import com.wish.finance.entity.vo.OutDetailsVo;
import com.wish.finance.service.ITCwCztxApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 商户充值提现申请表 前端控制器
 * </p>
 *
 * @author benjamin
 * @since 2022-04-02
 */
@RestController
@RequestMapping("/cztxApply")
public class TCwCztxApplyController {
    @Autowired
    ITCwCztxApplyService itCwCztxApplyService;

    @GetMapping("/outDetails")
    public MsgResult outDetails(OutDetailsVo qv) {
        PageHelper.startPage(qv.getPageNum(), qv.getPageSize());
        List<OutDetailsVo> list = itCwCztxApplyService.outDetails(qv);
        PageInfo<OutDetailsVo> pg = new PageInfo<>(list);
        return MsgResult.succeed(pg);
    }

    @GetMapping("/outStats")
    public MsgResult outStats(OutDetailsVo qv) {
        OutDetailsVo outDetailsVo = itCwCztxApplyService.outStats(qv);
        return MsgResult.succeed(outDetailsVo);
    }

}
